import request from '@/utils/system/request'


//获取聊天常用语
export function chatList(data) {
    return request({
      url: `/content/chatList?merchNo=${data.merchNo}`,
      method: 'get',
    })
  }
  //添加修改常用语
  export function saveOrUpdate(data) {
    return request({
      url: '/content/saveOrUpdate',
      method: 'post',
      data
    })
  }
  //常用语排序
  export function contentChangeSort(data) {
    return request({
      url: '/content/changeSort',
      method: 'post',
      data
    })
  }
  //删除常用语
  export function chatDel(data) {
    return request({
      url: `/content/del?id=${data.id}`,
      method: 'get',
    })
  }

  // 、获取用户列表
export function selectUser(data) {
	return request({
		method: "GET",
		url: `/user/selectUser?keyword=${data.keyword}`,
	})
}
  //获取服务商userSig
  export function getUserSig(data) {
    return request({
      method: "GET",
      url: `/merchant/getUserSig?merchantNo=${data}`,
    })
  }
//查询服务商列表
export function merchantSelectAll(data) {
  return request({
    url: '/merchant/selectAll',
    method: 'post',
    data
  })
}
//新增服务商
export function merchantAdd(data) {
  return request({
    url: '/merchant/add',
    method: 'post',
    data
  })
}
//修改服务商信息（头像，昵称）
export function merchantModify(data) {
  return request({
    url: '/merchant/modify',
    method: 'post',
    data
  })
}
//添加服务商子账号
export function addSubAccount(data) {
	return request({
		method: "GET",
		url: `/merchant/addSubAccount?merchantNo=${data.merchantNo}`,
	})
}
// 服务商增加余额
export function addPoints(data) {
	return request({
		method: "GET",
		url: `/merchant/addPoints?merchantNo=${data.merchantNo}&points=${data.points}`,
	})
}

